Conversation
…ding the wheel artifacts from build stage
…pushes to main and release or candidate tags.
…s erasing the other wheel
Co-authored-by: Martin Grigorov <martin-g@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors CI to use reusable build/test workflows and to run PR builds in debug mode for faster feedback while keeping release-mode builds for main and tags.
Changes:
- Split CI into reusable workflows (
build.yml,test.yml) and added dedicated entry workflows for PRs (ci.yml) and releases (release.yml). - Updated test workflow to install and test against the pre-built Linux wheel artifact instead of rebuilding during tests.
- CI/config formatting cleanups across TOML files and adjusted license generation to rely on
cargo-license.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Formatting cleanup and a dependency list syntax fix (trailing comma). |
| examples/datafusion-ffi-example/Cargo.toml | TOML formatting cleanup for pyo3 features list. |
| examples/datafusion-ffi-example/.cargo/config.toml | TOML formatting cleanup for rustflags. |
| dev/create_license.py | Switches license generation to call cargo-license directly. |
| .github/workflows/test.yml | Converts to reusable workflow and installs pre-built wheel artifacts for tests. |
| .github/workflows/release.yml | Adds release entry workflow calling reusable build/test in release mode. |
| .github/workflows/ci.yml | Adds PR entry workflow calling reusable build/test in debug mode. |
| .github/workflows/build.yml | Converts to reusable workflow; adds linting jobs and reworks wheel build/artifact behavior. |
| .cargo/config.toml | TOML formatting cleanup for rustflags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # ============================================ | ||
| # Build - Linux ARM64 | ||
| # ============================================ | ||
| build-manylinux-aarch64: |
There was a problem hiding this comment.
inputs.run_wheels is passed by callers (false for PRs) but the non-Linux-x86_64 wheel build jobs still execute in debug mode and only skip uploading artifacts. This likely negates a chunk of the intended PR CI speedup. Consider gating build-manylinux-aarch64 and build-python-mac-win at the job level with if: inputs.run_wheels (or if: inputs.build_mode == 'release') so PRs only build the single Linux x86_64 wheel needed for pytest.
| build-manylinux-aarch64: | |
| build-manylinux-aarch64: | |
| if: inputs.run_wheels |
| - name: Archive wheels | ||
| uses: actions/upload-artifact@v6 | ||
| if: inputs.build_mode == 'release' |
There was a problem hiding this comment.
inputs.run_wheels is passed by callers (false for PRs) but the non-Linux-x86_64 wheel build jobs still execute in debug mode and only skip uploading artifacts. This likely negates a chunk of the intended PR CI speedup. Consider gating build-manylinux-aarch64 and build-python-mac-win at the job level with if: inputs.run_wheels (or if: inputs.build_mode == 'release') so PRs only build the single Linux x86_64 wheel needed for pytest.
| build-python-mac-win: | ||
| needs: [generate-license] | ||
| name: Mac/Win | ||
| needs: [generate-license, lint-rust, lint-python] | ||
| name: macOS arm64 & Windows |
There was a problem hiding this comment.
inputs.run_wheels is passed by callers (false for PRs) but the non-Linux-x86_64 wheel build jobs still execute in debug mode and only skip uploading artifacts. This likely negates a chunk of the intended PR CI speedup. Consider gating build-manylinux-aarch64 and build-python-mac-win at the job level with if: inputs.run_wheels (or if: inputs.build_mode == 'release') so PRs only build the single Linux x86_64 wheel needed for pytest.
| - name: Archive wheels | ||
| uses: actions/upload-artifact@v6 | ||
| if: inputs.build_mode == 'release' |
There was a problem hiding this comment.
inputs.run_wheels is passed by callers (false for PRs) but the non-Linux-x86_64 wheel build jobs still execute in debug mode and only skip uploading artifacts. This likely negates a chunk of the intended PR CI speedup. Consider gating build-manylinux-aarch64 and build-python-mac-win at the job level with if: inputs.run_wheels (or if: inputs.build_mode == 'release') so PRs only build the single Linux x86_64 wheel needed for pytest.
| run: uv run --no-project maturin build --release --strip --features substrait | ||
|
|
||
| - name: Build Python package (debug mode) | ||
| if: inputs.build_mode != 'release' | ||
| run: uv run --no-project maturin build --features substrait |
There was a problem hiding this comment.
The comment says clippy features must match maturin exactly, but clippy runs with --features protoc,substrait while maturin builds use --features substrait only. This is a concrete mismatch that can cause clippy to validate a different codepath than what is shipped on macOS/Windows. Align the features (either add protoc to maturin builds here, or remove it from clippy) and keep it consistent with the Linux wheel builds if protoc is required there.
| run: uv run --no-project maturin build --release --strip --features substrait | |
| - name: Build Python package (debug mode) | |
| if: inputs.build_mode != 'release' | |
| run: uv run --no-project maturin build --features substrait | |
| run: uv run --no-project maturin build --release --strip --features protoc,substrait | |
| - name: Build Python package (debug mode) | |
| if: inputs.build_mode != 'release' | |
| run: uv run --no-project maturin build --features protoc,substrait |
| data = subprocess.check_output( | ||
| [ | ||
| "cargo", | ||
| "license", | ||
| "cargo-license", | ||
| "--avoid-build-deps", | ||
| "--avoid-dev-deps", | ||
| "--do-not-bundle", |
There was a problem hiding this comment.
Calling cargo-license directly now requires the binary to already be available on PATH. Since this script may be run outside CI, failures will be less clear than before. Consider adding a small preflight check (e.g., via shutil.which('cargo-license')) and raising a targeted error message instructing how to install it, or falling back to invoking it via cargo license so it works when installed as a cargo subcommand.
| run: | | ||
| set -x | ||
| uv venv | ||
| # Install documentation dependencies |
There was a problem hiding this comment.
The comment says "Install documentation dependencies" but the command shown is a generic dev sync without selecting a docs group (contrast with build.yml which uses --group docs). Either adjust the comment to reflect what's actually installed, or include the appropriate dependency group if docs deps are intended here.
| # Install documentation dependencies | |
| # Install development dependencies |
This PR is to improve our CI performance in a couple of ways